#7-3 用户登录模拟【组合数据类型】
dic={"aaa":["123456",10000],"bbb":["888888",5000],"ccc":["333333",3000]}
finalTest=3
name=input()
if name in dic.keys():
    # password = input()
    while finalTest > 0:
        password = input()
        if dic[name][0] == password:
            print("Success")
            break
        else:
            finalTest -= 1
            if finalTest > 0:
                print("Fail,{} Times Left".format(finalTest))
                # password = input()
            else:
                print("Login Denied")
else:
    print("Wrong User")